
public class BubbleSort {
	public static void main(String[] args) {
		int[] arr = {8,2,6,1,35,21,25};
		sort(arr);
		for(int a:arr){
			System.out.print(a + "\t");
		}
	}
	
	public static int[] sort(int[] arr){
			for(int i = 0;i < arr.length;i++){
				for(int j = i+1;j<arr.length;j++){
					if(arr[i]>arr[j]){
						int temp = arr[i];
						arr[i] = arr[j];
						arr[j] = temp;
					}
				}
			}
		return arr;
	}
}
